<?php

declare(strict_types=1);

namespace MultiWorker\Worker;

use MultiWorker\Process;

class WorkerKeeper extends Process
{
    /**
     * worker id.
     *
     * @var integer
     */
    protected $workerId;

    /**
     * WorkerKeeper Constructor,
     *
     * @param integer $pid
     * @param integer $workerId
     * @param array $config
     * @return void
     */
    public function __construct($pid,$workerId,array $config = [])
    {
        $this->setPid($pid);
        $this->workerId = $workerId;
        parent::__construct($config);
    }

    /**
     * get worker id.
     *
     * @return integer
     */
    public function getWorkerId (): int
    {
        return $this->workerId;
    }
}